import Base from './base';



class WsEvent extends Base {
  constructor() {
    super();
  }


  onConnect() {

  }

  onMessage(ops) {
    this.bus.$emit("newMessage", { ...ops, sender_icon: ops.icon })
    /*   if (this.isOpen(ops.sender)) {
        this.bus.$emit("newMessage", ops)
      } */
    /*     const isShow = this.isOpenShow(ops.sender) */
    /*     console.log(ops, 'ops') */
    /*  this.store.commit('changeMessageList', {
       patient_id: ops.sender,
       patient_name: ops.name,
       count: isShow ? 0 : '+1',
       message: ops.type === 'img' ? "[图片]" : ops.content,
       time: ops.time
     }) */
  }
}




export default new WsEvent();